-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add baseUrl option #294
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const context: FramesContext<TState> = { | ||
baseUrl: url, | ||
basePath, | ||
initialState: initialState as TState, | ||
request, | ||
url: new URL(request.url), | ||
resolvedBaseUrl: resolveBaseUrl(request, url, basePath), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it necessary to expose all of these (baseUrl
, basePath
, url
, and resolvedBaseUrl
) to the user? perhaps we should just give them the resolvedBaseUrl
and call it baseUrl
and remove the url
shortcut to be more explicit when they want to access the request url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense but that's breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url
was there because @davidfurlong found it better to access it like this. So I would not remove that. I will move resolvedBaseUrl
to baseUrl
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think basePath was very useful to the user to begin with so it's okay to remove in a breaking change. what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets do that in separate change
Change Summary
This PR adds
baseUrl
option which allows us to override the url detected from request.Merge Checklist